<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" rel="stylesheet" href="css/user.css"/>
    <script src="js/vue.js"></script>
    <script src="js/index.js"></script>
    <script src="js/axios-0.18.0.js"></script>
    <link rel="stylesheet" href="css/index.css">
</head>
<body>

<div id="app">
    <table class="altrowstable" id="alternatecolor">
        <tr>
            <th>用户编号</th>
            <th>用户名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>出生日期</th>
            <th>删除操作</th>
        </tr>
        <tr v-for="(user in users">

            <td >{{user.id}}</td>
            <td>{{user.userName}}</td>
            <td>{{user.age}}</td>
            <td>{{user.sex==1?"男":"女"}}</td>
            <td>{{user.birthday}}</td>
            <td><button >删除</button></td>
        </tr>

    </table>

</div>
</body>
  <script>
         var  vue = new Vue({
             el:"#app",
             data:{
                 users:[]
             },
             created(){
                 axios.get("/findAll").then((res)=>{
                     this.users = res.data
                 })

             },


         })

  </script>


</html>